const express = require('express')
const app = express()
const port = 8080
const userRouter = require('./router/user')
const cartsRouter = require('./router/carts')
// 引入中间件 编辑body参数
app.use(express.urlencoded({ extended: false }))
app.use(express.json())
app.use('/user', userRouter)
app.use('/cart', cartsRouter)


app.listen(port, () => console.log(`Example app listening on port ${port}!`))